<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf8">
            <script language="javascript">
                
                function fun1() {
                    ocfun1();//与oc协商好的方法无参数
                }
            
                function fun2() {
                    ocfun2("a","b","c");
                }
            
                function fun3() {
                    ocfun3(["六九","张三","明"]);
                }
            
                var testFunc = function test1 (  ) {
                    var lx = 666;
                    var id = 123;
                    var obj = new Object();
                    obj['lx'] = "1";
                    obj['id'] = "22";
                    return {'name':'jack', 'data':[1, 'hello', {'age' : 10}]};
                }


                function js1() {
                    document.getElementById("returnValue").value = "无传参";
                }
            
                function js2(str) {
                    document.getElementById("returnValue").value = str;
                }
            
            
            function js3(json) {
                document.getElementById("returnValue").value = JSON.stringify(json);
            }
            function js4(a,b,c) {
                alert(a);
                alert(b);
                alert(c);
                //var type = typeof json;
                //alert("s");
                //document.getElementById("returnValue").value = JSON.stringify(json);
            }
            
                </script>
            </head>
    
    <body>
        <h1>这是按钮调用</h1>
        <input type="button" value="调用oc方法，无参数" onclick="fun1()" />
        <input type="button" value="js给oc传字符串" onclick="fun2()" />
        <input type="button" value="js给oc传数组" onclick="fun3()" />
        <input type="button" value="js给oc传字典" onclick="testFunc()" />
        <h1>这是回调结果展示区</h1>
        <textarea id ="returnValue" type="value" rows="5" cols="50">
            
        </textarea>
    </body>
</html>
